package xcmg.device.web.screen;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import xcmg.device.infra.BasicController;
import xcmg.device.service.vo.screen.ScreenNetWorkVO;
import xcmg.device.service.wechat.StorefrontService;
import yb.ecp.fast.infra.infra.ActionResult;

import java.util.List;

/**
 * @Des 大屏接口
 * @Date 2021/2/18 11:53
 * @Author wangzhaoyu
 * @Param
 * @Return
 */
@RestController
@RequestMapping(value = "screen")
public class ScreenController extends BasicController {
    @Autowired
    private StorefrontService storefrontService;

    /**
     * @Des 获取全部网点信息，大屏展示使用
     * @Date 2021/2/18 12:00
     * @Author wangzhaoyu
     * @Param []
     * @Return yb.ecp.fast.infra.infra.ActionResult
     */
    @RequestMapping(value = "netWorks" , method = RequestMethod.GET)
    public ActionResult netWorks(){
        List<ScreenNetWorkVO> allNetWork = storefrontService.getAllNetWork();
        return actionValueResult(allNetWork);
    }
}
